<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<%String ctx = request.getContextPath();%>
<link href="<%=ctx%>/css/bootstrap.min.css"  rel="stylesheet">
<link href="<%=ctx%>/css/manage.css"  rel="stylesheet">
<script src="<%=ctx%>/js/jquery.min.js" type="text/javascript" ></script>

<script>
	function AjaxLoad(uri) {
		let xmlHttp = new XMLHttpRequest();
		xmlHttp.onreadystatechange = function()
		{
			if(xmlHttp.readyState === 4 && xmlHttp.status === 200) {
				$("#ajax-div").html(xmlHttp.responseText);
			}
		}
		xmlHttp.open("POST", uri,  true);
		xmlHttp.send();
	}
	
</script>

<title>控制台</title>
</head>
<body>
	<div id="left-nav" class="open">
		<div class="author-nav"> <img src="../img/logo.png"/> </div>
		<div class="main-nav">
			<ul> 
				<a onclick="AjaxLoad('<%=ctx%>/control?act=classOpera')"> 
					<li>班级</li> 
				</a>
			</ul>
			<ul> 
				<a onclick="AjaxLoad('<%=ctx%>/control?act=userOpera')"> 
					<li>学生</li> 
				</a>
			</ul>
			<ul> 
				<a onclick="AjaxLoad('<%=ctx%>/control?act=questionOpera')"> 
					<li>题目</li>
				</a>
			</ul>
			<ul> <a onclick="AjaxLoad('<%=ctx%>/control?act=paperOpera')"> 
					<li>试卷</li> 
				</a>
			</ul>
			<ul> <a onclick="AjaxLoad('<%=ctx%>/control?act=examOpera')"> 
					<li>考试</li> 
				</a>
			</ul>
			<ul>
				<a onclick="AjaxLoad('<%=ctx%>/control?act=scoreSetOpera')">
					<li>分值</li>
				</a>
			</ul>
			<ul>
				<a onclick="AjaxLoad('<%=ctx%>/control?act=resultOpera')">
					<li>成绩</li>
				</a>
			</ul>
			<ul> 
				<a href="<%=ctx%>/servlet/LogoutServlet"> 
					<li>退出</li> 
				</a>
			</ul>
			<ul> <a onclick="AjaxLoad('<%=ctx%>/control?act=correctOpera')">
				<li>简答题批改</li>
			</a>
			</ul>
		</div>
	</div>

	<div id="ajax-div"/>
	
</body>
</html>